﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DocViewer.Common;

public partial class MasterPage : System.Web.UI.MasterPage
{
    DY.BLL.tbl_User bllUser = new DY.BLL.tbl_User();
    public string Avatar = "";
    public string TrueName = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        CheckUserRight();
        BindData();
    }

    private void BindData()
    {
        IMG_Avatar.ImageUrl = CurUser.Lang;
        TrueName = CurUser.Name;

    }

    private void CheckUserRight()
    {
        if ((CurUser.Id==0) || string.IsNullOrEmpty(CurUser.LoginName))
        {
            Response.Redirect("~/Login.aspx?redir="+Page.Request.Url);
        }
    }
}
